home *** CD-ROM | disk | FTP | other *** search
/ Top 200 Programs / Top 200 Programs.iso / Bob8 / THOMPSON / LIBERTY / PRODUCT / LB14W.EXE / WINRECT.BAS < prev   
BASIC Source File  |  1996-02-02  |  718b  |  28 lines

  1.  
  2.     'WINRECT.BAS - show how to get window position and size
  3.     'and demonstrate how to use the struct statement
  4.  
  5.     struct winRect, _
  6.         orgX as uShort, _
  7.         orgY as uShort, _
  8.         cornerX as uShort, _
  9.         cornerY as uShort
  10.  
  11.     open "test me" for window as #win
  12.  
  13.     open "user.dll" for dll as #user
  14.  
  15.     hndl =  hwnd(#win)
  16.  
  17.     calldll #user, "GetWindowRect", _
  18.         hndl as word, _
  19.         winRect as struct, _
  20.         result as void
  21.  
  22.     print "Upper Left corner of 'test me' is: "; winRect.orgX.struct; ", "; winRect.orgY.struct
  23.     print "Lower Right corner of 'test me' is: "; winRect.cornerX.struct; ", "; winRect.cornerY.struct
  24.  
  25.     close #user
  26.  
  27.     input r$
  28.